This invention relates to a digital image processor for subjecting input image data to digital image processing. More particularly, the invention relates to a digital image processor, which has a digital cellular neural network architecture (CNN) based upon a discrete-time cellular neural network (DTCNN), capable of subjecting input image data to a variety of image processing.
Converting an analog signal of a natural image to a digital signal of a digital halftone image usually is carried out by discretization in the time direction (sampling) and in the size direction (quantization). Such processing results in loss of information. However, if note is taken of the fact that a natural image contains many low-frequency components and exhibits strong correlation in a spatio-temporal.sub.-- neighborhood, a digital halftone image approximating the natural image can be obtained by quantization image processing involving a small number of bits. Quantization image processing involving a small number of bits is processing through which a digital halftone image expressed by a smaller number of bits is formed, by utilizing information in the spatio-temporal neighborhood area, from an analog natural image or from a quantized image consisting of a large number of bits obtained by A/D-converting each gray-level value of the analog natural image independently using an A/D converter that operates on a large number of bits.
The devided pixel digital halftoning (digital halftoning) method has long been used to form a pseudo-digital halftone image. This method entails reproducing grays by changing the percentage of black in a neighborhood image in order to reproduce a gray-level image by a black-and-white bi-level printer or display. Examples of such methods in practical use include the dither method, in which a gray level u(x,y) of the original image is compared with a threshold value T calculated in accordance with a set rule, and the extrapolative error diffusion method (the ordinary error diffusion method) in which the error between an input gray-level image value and an output halftone image is diffused to pixels that have not yet been scanned.
In a filtering operation in which each gray-level value of a neighboring pixel centered on a pixel of interest is multiplied by a suitable weighting value at the position of each pixel of interest and a weighted sum in the neighborhood area is outputted, a matrix in which the weighting value is an element is referred to as a spatial filter. The reaction at a point (i,j) of a pixel brought about by an image input u.sub.kl (t) in a processor N(k,l) (referred to as a "cell" below) of a point (k,l) belonging to the neighborhood Nr(i,j) of the point (i,j) of the pixel is expressed as follows: ##EQU1## This is referred to as a convolution of w(i,j;k,l) by u.sub.kl (t) or a multiply-and-accumulate operation applied to a weighting value w and variable u in the neighboring image area, and may be abbreviated to R.sub.ij (t)=(w*u).sub.ij.
The dither method is expressed as follows, where U represents a unit function: ##EQU2##
The extrapolative error diffusion method is a non-linear recursive system with respect to an input u.sub.ij (t) and output y(t)=S.sub.ij (t) at an (i,j)th raster scan. Equation with respect to this method is given as follows: ##EQU3## Here k.ltoreq.i, j&lt;i for k=i are the extrapolative conditions. Further, g(x)=S(x)-x holds. In case of binarization, y=S(x) becomes a sign function. ##EQU4## Further, weighting w.sub.k is a weighting value, which is a parameter that influences the ensuing quantization. This decides the propagation of the quantization error or the way the quantization error is diffused. The weighting w.sub.k is negative and the total sum thereof must be -1.
In order to obtain a halftone image close to an analog natural image with a density pattern method or the dither method, a problem encountered is that the number of bits per pixel must be made fairly large. On the other hand, with the error diffusion method used in binarizing a digital image, a problem encountered is blurring of image having fine edges, as in the case of a minutely sampled character image. If the number of bits per pixel is increased, a problem that arises is the occurrence of a false contour which undergoes absolutely no change in a certain neighborhood only. This problem is brought about by the fact that error diffusion is made to scan in one direction.
Processing for quantizing an image involves a tradeoff among sampling rate, size of the quantization steps and quantization distortion. Accordingly, attention has been directed toward one type of optimization problem, namely the quantization of a digital halftone image in such a manner that it will approximate an input gray-level image, and parallel analog neural networks that solve this optimization problem have been proposed.
One of these is an analog symmetrical error diffusion neural network. The non-linear dynamics are described by an equation the same as that of Equation (34), referred to later, if the extrapolation conditions k.ltoreq.i, j&lt;i for k=i are removed. The hardware is realized by an analog neural network. In this case the quantization error of each pixel is diffused in analog fashion two-dimensionally to the surrounding neighborhood system.
An analog system referred to as a cellular neural network (CNN) also has been proposed. This is a method which employs a non-linear analog circuit in which cells are locally connected in systematic fashion. Each cell is composed of a capacitor, a resistor and a partitioning linear cell. Since the CNN performs analog processing in parallel fashion continuously in time, it is possible to implement real-time signal processing, which is held to be difficult with digital processing. Furthermore, in analog processing, it is possible to realize a technique in which a conversion is made to digital information in parallel fashion by the dynamic quantizing operation of a plurality of cells without using the sequential operation of a highly sophisticated A/D converter, and the digital information can be stored or transmitted in a parallel manner. The advantages of analog processing by a CNN are good coupling to sensors, voltage and current distributions of high speed, the rapid acquisition of overall information, and the fact that the multiply-and-accumulate operation can be carried out simply in parallel-processing fashion using the sum of currents. Though the cells in a CNN are connected only to neighboring cells, even cells that are not directly connected influence one another indirectly owing to the effects of propagation resulting from the dynamics of the system. In general, an M.times.N CNN has M.times.N cells arrayed in M rows and N columns. Let a cell of an ith row and jth column be represented by C(i,j). An r-neighborhood system of the cell C(i,j) is defined by the following equation: EQU Nr(i,j)={C(k,l).vertline.max{.vertline.k-i.vertline.;.vertline.l-j}.ltoreq. r, l.ltoreq.k&lt;M; l.ltoreq.l.ltoreq.N} (5)
where r represents a positive integer. In general, the neighborhood system of r=1 is referred to as a "3.times.3 neighborhood system," the neighborhood system of r=2 as a "5.times.5 neighborhood system," and the neighborhood system of r=3 as a "7.times.7 neighborhood system. " If C(i,j) .epsilon.N.sub.r (k,l) holds for all C(i,j) and C(k,l) in these neighborhood systems owing to symmetry, then we will have C(k,l) .epsilon.Nr(i,j). Each cell is composed of a capacitor, a resistor and a non-linear element which is partitioning linear. The equation of state of the cell C(i,j) is expressed as follows with regard to a state variable x.sub.ij, an input variable u.sub.kl, an output variable y.sub.ij, an offset I, a capacitor C, a resistor R.sub.x and an image 1.ltoreq.i.ltoreq.M; 1.ltoreq.j.ltoreq.N:
Equation of State: ##EQU5## Output: EQU y.sub.ij (t)=1/2(.vertline.x.sub.ij +1.vertline.-.vertline.x.sub.ij -1.vertline.) (7) EQU .vertline.x.sub.ij (0).vertline..ltoreq.1 (8) EQU .vertline.u.sub.ij .vertline..ltoreq.1 (9)
The parameters are assumed to be as follows: EQU A(i,j; k,l)=A(k,l; i,j), Eq. (10) EQU C&gt;0, R.sub.x &gt;0 Eq.(11)
All of the cells in a CNN have the same circuit structure and element values. The number of cells in a neighborhood is (2r+1).sup.2. In terms of dynamics, a CNN possesses both an output feedback mechanism and a feed forward mechanism. The former depends upon an A-template, A (i,j; k,l), and the latter depends upon a B-template, B (i,j; k,l). These templates are programmable parameters. In order that all steady-state outputs of a cell will be fixed at .+-.1 in a CNN, the following theorem is used:
If the circuit parameter A (i,j; i,j) at the center of the A-template satisfies the condition EQU A(i,j; i,j)&gt;1/R.sub.x (12)
then the cell will converge to a single stable equilibrium point. In addition, the following equations will hold: ##EQU6## This theorem makes the binarization of an image possible and is an analog error-minimization dynamics method.
The problem encountered with the analog symmetrical error-diffusion neural network and analog CNN according to the prior art is that an analog chip for large-scale image processing cannot be constructed merely by promulgating analog principles and theory in the form of technical papers.
Even if a CNN is premised on neighborhood connection, cells are provided in a number equivalent to the number of pixels and a plurality of neighborhood connections are made in terms of the overall image. This means that the wiring would occupy almost the entire area of the silicon area of the chip. In actuality, however, a large-scale analog neural network in which cells are deployed for all pixels cannot be constructed as an LSI and, even if it could, the cost would be prohibitive and render the idea impractical.
In a case where the values of templates are changed, the circuit must be re-designed, thereby detracting from universality.
In a case where an image processing technique using a CNN is applied to a display device such as a ferroelectric liquid crystal display (FLCD), i.e., where a moving image that has been subjected to binarization or grayscaling by a CNN is displayed on such an FLCD, the display develops flicker in still areas of the moving image when the pixel levels outputted by grayscaling constantly change.